Skip to content

zNPCPrawn Tweaks#537

Merged
JoshSanch merged 6 commits intobfbbdecomp:mainfrom
daft7:40push
May 11, 2025
Merged

zNPCPrawn Tweaks#537
JoshSanch merged 6 commits intobfbbdecomp:mainfrom
daft7:40push

Conversation

@daft7
Copy link
Contributor

@daft7 daft7 commented May 10, 2025

Minor filling in of some methods for the zNPCPrawn class.

@github-actions
Copy link

🆗 ✅

+199 bytes
🆗 Bot Rating: A fair and commendable contribution

No Regressions 🎉

Progress: 5

📈 main/SB/Game/zNPCTypePrawn - .text +200 bytes -> 12.74%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::set_floor_state(zNPCPrawn::floor_state_enum, bool, bool) +68 bytes -> 39.13%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::decompose() +48 bytes -> 28.89%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::update_round() +11 bytes -> 9.30%
main/SB/Game/zNPCTypePrawn - zNPCPrawn::reappear() +72 bytes -> 100.00%

@github-actions
Copy link

🆗 ✅

+199 bytes
🆗 Bot Rating: A fair and commendable contribution

No Regressions 🎉

Progress: 5

📈 main/SB/Game/zNPCTypePrawn - .text +200 bytes -> 12.74%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::set_floor_state(zNPCPrawn::floor_state_enum, bool, bool) +68 bytes -> 39.13%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::decompose() +48 bytes -> 28.89%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::update_round() +11 bytes -> 9.30%
main/SB/Game/zNPCTypePrawn - zNPCPrawn::reappear() +72 bytes -> 100.00%

Comment on lines +582 to +590
//sp8 = @784.unk0;
//spC = @784.unk4;
// sp8 = temp_r6->unk20.unk0;
// spC = temp_r6->unk28;
// M2C_ERROR(/* unknown instruction: cror eq, gt, eq */);
// if ((temp_f3 != -0.00001f) || (M2C_ERROR(/* unknown instruction: cror eq, lt, eq */), ((temp_f3 == 0.00001f) == 0)) || (((temp_f2 = this->unk320, M2C_ERROR(/* unknown instruction: cror eq, gt, eq */), ((temp_f2 == -0.00001f) == 0)) || (M2C_ERROR(/* unknown instruction: cror eq, lt, eq */), ((temp_f2 == 0.00001f) == 0))) && ((temp_f2_2 = this->unk2C4.unk0, ((temp_f2_2 > this->unk2C8) == 0)) || !((f32) fabs(temp_f2_2 - sp8) < 0.001f)) && ((temp_f2_3 = this->unk2C8, ((this->unk2C4.unk0 < temp_f2_3) == 0)) || !((f32) fabs(temp_f2_3 - spC) < 0.001f)))) {
// var_r0 = 1;
// }
//return var_r0; Maybe not void?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this comment? I don't think this would be too helpful for someone looking at this function for the first time, and is just output from M2C

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it because it does provide some structure but I understand removing it too.

@github-actions
Copy link

🆗 ✅

+199 bytes
🆗 Bot Rating: A fair and commendable contribution

No Regressions 🎉

Progress: 5

📈 main/SB/Game/zNPCTypePrawn - .text +200 bytes -> 12.74%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::set_floor_state(zNPCPrawn::floor_state_enum, bool, bool) +68 bytes -> 39.13%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::decompose() +48 bytes -> 28.89%
📈 main/SB/Game/zNPCTypePrawn - zNPCPrawn::update_round() +11 bytes -> 9.30%
main/SB/Game/zNPCTypePrawn - zNPCPrawn::reappear() +72 bytes -> 100.00%

@JoshSanch JoshSanch merged commit cf19fc4 into bfbbdecomp:main May 11, 2025
5 checks passed
@daft7 daft7 deleted the 40push branch May 12, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants